﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IStandard" here, you must also update the reference to "IStandard" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IStandard
    {
        [OperationContract]
        int Standard_Using(int StandardID);

        [OperationContract]
        DataSet Standard_GetAll();

        [OperationContract]
        StandardInfo Standard_GetInfo(int StandardID);

        [OperationContract]
        DataSet Standard_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int Standard_Insert(StandardInfo eInfo);

        [OperationContract]
        bool Standard_Update(StandardInfo eInfo);

        [OperationContract]
        bool Standard_Delete(int StandardID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class StandardInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
    }
}
